<?php

namespace app\admin\model;

use think\Model;


class CouponCodes extends Model
{


    // 表名
    protected $name = 'coupon_codes';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    public function coupon()
    {
        return $this->belongsTo('CouponCodeCategory', 'coupon_code_category_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function statusLits()
    {
        return ['0'=>__('normal'),'1'=>__('handed'),'2'=>__('past'),'3'=>__('delete') ,'4'=>__('已退货'),'5'=>__('timeout')];
    }
}
